package com.xy.config.mqtt;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "mqtt")
public class MqttProperties {

    private String ip;

    private boolean subscribe;

    private Integer responseTimes;

    private Integer tcpPort;

    public String getTcpUrl() {
        return "tcp://" + ip + ":" + tcpPort;
    }
}
